import { defineStore } from 'pinia';
import { ref } from 'vue';

export const useThemeStore = defineStore(
	'themes',
	() => {

		const currentTheme = ref<string>('light');
		const toggleTheme = (value) => {
			currentTheme.value = value;
			// themeConfig.value.algorithm = theme.defaultAlgorithm;
		};

		return {
			currentTheme,
			toggleTheme
		};
	},
	{
		// persist: true,
		persist: {
			storage: sessionStorage
		}
	}
);
